HatchShape AddArc

Adds an Arc boundary to the HatchShape.

Overloads

public void AddArc(float centerX, float centerY, float centerZ, float radius, float startAngle, float sweepAngle)
public void AddArc(float centerX, float centerY, float centerZ, float radius, float startAngle, float sweepAngle, float maximumSegmentationError)

 

Return value

void  

 

Parameters

float centerX The x coordinate of the center
float centerY The y coordinate of the center
float centerZ The z coordinate of the center
float radius The radius of the arc
float startAngle The StartAngle(measured in radian) of the arc
float sweepAngle The Sweep angle(measured in radian) of the arc
float maximumSegmentationError measures how much a curve deviates from a straight line segment between two points on the curve.

 

Example

Copy
scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);

if (scanDocument != null)
{
    VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);

    vectorImage.SetMarkSpeed(1000);
    vectorImage.SetJumpSpeed(2000);
    vectorImage.SetJumpDelay(100);
    vectorImage.SetMarkDelay(100);

    //Set Laser Delays
    vectorImage.SetLaserOnDelay(10);
    vectorImage.SetLaserOffDelay(10);
    
    HatchShape hatchShape = new HatchShape();
    hatchShape.AddArc(0, 0, 0, 10, 0, 120 * (float)(Math.PI / 180), 0.5f);
    hatchShape.AddHatchPatternLine(0.1f, HatchLineBorderGapDirection.Inward, 0.05f,
                   0, 0, 0, HatchLineStyle.Serpentine, true,
                   HatchOffsetAlgorithm.DirectOffset, HatchCornerStyle.Sharp);

    vectorImage.AddHatch(hatchShape, 0);

    scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "ScanAll()"));

    try
    {
        scanDocument.StartScanning();
    }
    catch (Exception exp)
    {
        MessageBox.Show(exp.Message);
    }
}